-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Elasticsearch-DSL code #2736
Conversation
A documentation preview will be available soon. Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
4ec2881
to
7b1af33
Compare
1d951c6
to
9cab9c2
Compare
@pquentin The builds are currently not generating code coverage data, and I haven't been able to figure out why. And I get coverage data when I run the tests locally. I'll continue looking for this, but if you have any ideas why this is happening let me know. Other than this the PR is ready for a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The unasync of the DSL classes remains in a separate run-unasync-dsl.py script. We can consider merging the two.
- The generator.py script that generates the query, aggregation and response source files was moved to this project as generator-dsl.py, along with its Jinja templates. We can consider moving this to the Python client generator project.
Yes, please, as a follow-up.
@pquentin The builds are currently not generating code coverage data, and I haven't been able to figure out why. And I get coverage data when I run the tests locally. I'll continue looking for this, but if you have any ideas why this is happening let me know. Other than this the PR is ready for a review.
I haven't looked in detail yet, but the current build has 13% coverage, and we don't use coverage for anything meaningful today. However it would be nice to fix this issue as I'm seeing 0% coverage here. (In the future, we can exclude generated code to make coverage more useful.)
528c4c5
to
5e74429
Compare
@pquentin The last commit addresses your feedback. One thing I want to direct your attention to, is the handling of the user agent, which I only noticed now. The connection class used to add an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sorry, I did not realize my mypy suggestion would bring so much changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM. 🚀
This change adds the Elasticsearch-DSL code. Note that the documentation will be merged in a separate PR.
elasticsearch_dsl
package, except that its root is nowelasticsearch.dsl
. Users can replace the_
with a.
in all imports.https://
Elasticsearch endpoints, since that is what we are using in integration test runs.run-unasync-dsl.py
script. We can consider merging the two.generator.py
script that generates the query, aggregation and response source files was moved to this project asgenerator-dsl.py
, along with its Jinja templates. We can consider moving this to the Python client generator project.